package com.lanou3g.hw0408;

public class Pear {
    private int weight;
    private String color;
    private String taste;

    public Pear(int weight, String color, String taste) {
        this.weight = weight;
        this.color = color;
        this.taste = taste;
    }

    public Pear() {
    }

    public void eat() {
        System.out.println("这是一个" + weight + "g重的" + color
                + "的" + taste + "鸭梨");
    }


    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getTaste() {
        return taste;
    }

    public void setTaste(String taste) {
        this.taste = taste;
    }
}
